//
//  SettingsTableViewCell.m
//  ITHome
//
//  Created by lanou3g on 15/7/14.
//  Copyright (c) 2015年 YAX. All rights reserved.
//

#import "SettingsTableViewCell.h"

@implementation SettingsTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark - 自定义cell初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        // 图标
        self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, 25, 25)];
        [self.contentView addSubview:_iconImageView];
    
        // 文本
        self.textInfoLabel = [[UILabel alloc] initWithFrame:CGRectMake(_iconImageView.x + _iconImageView.width + 15, 10, 200, 20)];
        self.textInfoLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_textInfoLabel];
        
        // 开关
        self.settingsSwith = [[UISwitch alloc] initWithFrame:CGRectMake(kScreenWidth - 70, 5, kScreenWidth - (kScreenWidth - 100), 44)];        
        [self.contentView addSubview:_settingsSwith];
        
    }
    return self;
}

@end
